package com.umgsai.thread.thread01;

public class MyThread15 extends Thread {

	@Override
	public void run() {
		while (true) {
			if (this.isInterrupted()) {
				System.out.println("interrupted..");
				return;
			}
			System.out.println("timer=" + System.currentTimeMillis());
		}
	}
	
	public static void main(String[] args) throws InterruptedException {
		MyThread15 thread = new MyThread15();
		thread.start();
		Thread.sleep(1000);
		thread.interrupt();
	}
}
